import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import VueJsx from "@vitejs/plugin-vue-jsx";
import path from "path";

function _resolve(dir) {
  return path.join(__dirname, dir);
}

// https://vitejs.dev/config/
export default defineConfig({
  base: "",
  plugins: [
    vue(),
    VueJsx({}),
  ],
  resolve: {
    alias: [
      {
        find: "@",
        replacement: _resolve("src"),
      },
    ],
  },
  build: {
    outDir: "extension/dist",
  },
  server: {
    host: "0.0.0.0",
    port: 10900,
    open: true,
  },
});
